package struct_example

import "fmt"

type Car struct {
	Power     string
	Length    string
	Width     string
	High      string
	Wheelbase string
}

func (c Car) String() string {
	return fmt.Sprintf("%s%s%s%s%s", c.Power, c.Length, c.Width, c.High, c.Wheelbase)
}

type GasolineCat struct {
	Name    string
	Engine  string
	Gearbox string
	Chassis string
	Car
}

func (gc GasolineCat) String() string {
	return fmt.Sprintf("%s 类型（%s）", gc.Name, gc.Car)
	//return fmt.Sprintf("%s%s%s%s", gc.Name, gc.Engine, gc.Gearbox, gc.Chassis)
}
